package level1 
{
	import org.thot.model.ge.CyclicGameEvent;
	import org.thot.model.ge.GameEvent;
	/**
	 * ...
	 * @author Thot
	 */
	public class DisplayMessageEvent extends CyclicGameEvent
	{
		
		protected var m_start:Boolean;		
		
		public function DisplayMessageEvent() 
		{
			
			super( 'displayMessageEvent', 'start_DisplayMessage_Cyclic', 1000, 10 );
			init();
		}
		
		private function init():void 
		{
			m_start = false;
		}
		
		override public function process():void
		{
			if ( !m_start )
			{
				start();
				//allowExternalLaunch = false;
				m_start = true;
			}
			
			scriptAPI.log( new String(scriptAPI.getGlobalVar( "message" )) );
			super.process();
		}
		

		
		override public function destroy():void
		{
			scriptAPI.log( new String( 'destroy '+ name ) );
			super.destroy();
		}
		
	}

}